/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __AERO_OLED_H
#define __AERO_OLED_H

#ifdef __cplusplus
 extern "C" {
#endif
                                              
/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_conf.h"
#include "aero_conf.h"
#include "main.h"

#define SetCsPin 	GPIO_SetBits(OLED_PORT,OLEDCS)
#define SetDcPin 	GPIO_SetBits(OLED_PORT,OLEDDC)
#define SetMosiPin 	GPIO_SetBits(OLED_PORT,OLEDMOSI)
#define SetClkPin	GPIO_SetBits(OLED_PORT,OLEDCLK)
#define SetResPin	GPIO_SetBits(OLED_PORT,OLEDRES)

#define ClrCsPin 	GPIO_ResetBits(OLED_PORT,OLEDCS)
#define ClrDcPin 	GPIO_ResetBits(OLED_PORT,OLEDDC)
#define ClrMosiPin 	GPIO_ResetBits(OLED_PORT,OLEDMOSI)
#define ClrClkPin	GPIO_ResetBits(OLED_PORT,OLEDCLK)
#define ClrResPin	GPIO_ResetBits(OLED_PORT,OLEDRES)


void OledPor();
void OledInit();
void OledClear(void);
void OledRefreshGram(void);
void OledShowChar(unsigned char x,unsigned char y,unsigned char chr,unsigned char size,unsigned char mode);
void OledShowNum(unsigned char x,unsigned char y,unsigned int num,unsigned char len,unsigned char size,unsigned char mode);
void OledShowString(unsigned char x,unsigned char y,char *p,unsigned char mode);


#ifdef __cplusplus
}
#endif

#endif 
